<?php

namespace App\Controllers\Test;

use App\Libs\DB\AnxinPdo;
use App\Models\Diary\Diary;
use App\Models\Order\Order;
use App\Libs\Log\Logger;
use \App\Libs\Pay\PayLibs;

class Refund extends \App\Libs\Base\BaseAction
{
    protected function beforeRun()
    {
        parent::beforeRun();
    }

    protected function execute()
    {
        $order_sn = $this->request->get('order_sn');
        $refundInfo = [
            'out_trade_no' => $order_sn,       //本系统的订单号
            'refund_amount' => '0.01',  //退款金额
        ];

        $alipay = new PayLibs(1);
        $response = $alipay->alipayRefund($refundInfo);
        print_r($response);
        die;
    }
}
